<!DOCTYPE html>
<html lang="en">

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
		<title>登录</title>
		<link rel="stylesheet" href="css/base.css" />
		<link rel="stylesheet" href="css/iconfont.css" />
		<link rel="stylesheet" href="css/register.css" />
		<link rel="stylesheet" href="css/all.css" />
	</head>

	<body>
		<div>
			<div class="head-photo">
				<img src="img/touxiang.png" alt="">
			</div>
			<div class="cell">
				<i>+86</i>
				<input type="text" placeholder="请输入手机号" class="resetUpwd-input" id="registerPhone"/>
			</div>
			<div class="cell">
				<i>密码</i>
				<input type="text" placeholder="请输入密码" class="resetUpwd-input" id="registerPassword"/>
			</div>
			<div class="cells">
				<a href="forget-password.html">
					<span class="cell-one">忘记密码？</span>
				</a>
				<a href="login.html">
					<span class="cell-two">立即注册</span>
				</a>
			</div>
			<!--<a onclick="location.href='./home-page.html'">-->
				<button type="button" class="resetUpwd">登录</button>
				<!--<input type="button" value="登录" class="resetUpwd" />-->
			<!--</a>-->
			<div class="consent"><span>登录即代表同意</span><span>服务条款</span></div>
			<div class="thirds">
				<p>第三方登录</p>
				<div class="row">
					<a onclick="location.href=''">
						<div class="third">
							<img src="img/qq.png" alt="">
						</div>
					</a>
					<a onclick="location.href=''">
						<div class="third">
							<img src="img/weixin.png" alt="">
						</div>
					</a>
					<a onclick="location.href=''">
						<div class="third">
							<img src="img/weibo.png" alt="">
						</div>
					</a>
				</div>
				<!--8666-->
			</div>
		</div>
		<script src="js/jquery.js"></script>
		<script src="js/x_rem.js"></script>
		<script src="js/all.js"></script>
		<script>
			$(".resetUpwd").click(function(){
				if(!vali($("#registerPhone"), /^1[0-9]{10}$/, "请输入正确的手机号")){
					
				}else if(!vali($("#registerPassword"),/^[a-zA-Z0-9_]{6}$/,"请输入6位字母或数字")){
					
				}else{
					console.log("xx");
					//传的数据
					var data={
						userName: $("#registerPhone").val(),
						password: $("#registerPassword").val()
					}
					
					//成功后调用的函数
					var success=()=>{
						popup("登录成功");
						setInterval(()=>{
							location.href="home-page.html";
						},2000)
					}
					
					
					Hajax("post","/user/mobilePhoneLogin",data,success);
				}
				
				
			})
			
			
			
		</script>
	</body>

</html>